from django.conf.urls.defaults import *
from django.conf import settings

urlpatterns = patterns('finance.views',
    url(r'^$', 'index', name='index'),
    url(r'^can-not-access/$', 'can_not_access', name='can_not_access'),

) + patterns('finance.views.transaction',
    url(r'^transaction/$', 'create', name='transaction_create'),
    url(r'^transaction/(?P<year>\d{4})/list/$', 'year_list', name='transaction_list'),
    url(r'^transaction/(?P<year>\d{4})/(?P<month>\d{1,2})/list/$', 'month_list', name='transaction_month_list'),
    url(r'^transaction/(?P<year>\d{4})/(?P<month>\d{1,2})/list/csv/$', 'month_csv', name='transaction_month_csv'),
    url(r'^transaction/detail/(?P<transaction_id>\d+)/$', 'detail', name='transaction_detail'),
    url(r'^transaction/change/(?P<transaction_id>\d+)/$', 'change', name='transaction_change'),
    url(r'^transaction/delete/(?P<transaction_id>\d+)/$', 'delete', name='transaction_delete'),
#    url(r'^transaction/detail/csv/(?P<invoice_id>\d+)/$', 'detail_csv', name='tempinvoice_detail_csv'),
#    url(r'^invoice/list/csv/(?P<year>\d{4})/$', 'year_list_csv', name='invoice_year_list_csv'),
#    url(r'^invoice/list/(?P<year>\d{4})/(?P<month>\d{1,2})/$', 'month_list', name='invoice_month_list'),
#    url(r'^invoice/school/(?P<school_id>\d+)/(?P<year>\d{4})/$', 'school_list', name='invoice_school_list'),
#    url(r'^invoice/detail/(?P<invoice_id>\d+)/$', 'detail', name='tempinvoice_detail'),
#    url(r'^invoice/detail/csv/(?P<invoice_id>\d+)/$', 'detail_csv', name='tempinvoice_detail_csv'),
#    url(r'^invoice/change/(?P<invoice_id>\d+)/$', 'change', name='invoice_change'),
#    url(r'^invoice/delete/(?P<invoice_id>\d+)/$', 'delete', name='invoice_delete'),
#    url(r'^invoice/(?P<year>\d{4})/(?P<month>\d{1,2})/school/(?P<school_id>\d+)/$', 'list', name='list'),

) + patterns('',
    url(r'^static/(.*)$', 'django.views.static.serve', {
        'document_root': settings.FINANCE_STATIC_ROOT,
        }, name='finance_static'),

)
